package com.itheima.homework.test1;

/**
 * @author jiangxun
 * @date 11-19-2024
 */
public class SilverCard extends Card{
    public SilverCard(String cardNumber, double balance) {
        super(cardNumber, balance);
    }
    @Override
    public void pay(double amount) {
        double discountedAmount = amount * 0.85;
        if(discountedAmount<=getBalance()){
            System.out.println("使用银卡支付,按照原来85折计算输出");
        }else{
            System.out.println("余额不足");
        }
    }
}
